package com.tcoiss.common.component.api;

import com.tcoiss.common.component.api.model.*;
import com.tcoiss.common.core.constant.ServiceNameConstants;
import com.tcoiss.common.core.domain.R;
import com.tcoiss.common.core.web.domain.AjaxResult;
import com.tcoiss.common.component.api.factory.RemoteApiFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;
import java.util.Map;

/**
 * webapi
 * 
 * @author tcoiss
 */
@FeignClient(contextId = "remoteApiService", value = ServiceNameConstants.WEBAPI_SERVICE, fallbackFactory = RemoteApiFallbackFactory.class)
public interface RemoteApiService
{
    /**
     *执行Api调用
     * @param
     * @return 结果
     */
    @PostMapping("/apiService/executeApi")
    public R<Map<String,Object>> executeApi(@RequestBody ApiParam apiParam);

    /**
     *执行Api调用
     * @param
     * @return 结果
     */
    @PostMapping("/apiService/executeKdApi")
    public R<Map<String,Object>> executeKdApi(@RequestBody ApiParam apiParam);

    @PostMapping("/executeK3Api")
    public R<K3Result> executeK3Api(@RequestBody ApiParam apiParam);

    @RequestMapping("/admindivision/initData")
    public AjaxResult initData();

    @RequestMapping("/wx/sendWxMessage")
    public AjaxResult sendWxMessage(@RequestBody Map<String, Object> paramMap);

    @RequestMapping("/gaodeApi/getDistrictInfo")
    public R<List<GdAdminDivisionVo>> getDistrictInfo();

    @RequestMapping("/apiServiceConfig/getApiConfigByNo")
    public R<ApiLogVo> getApiConfigByNo(ApiLogVo apiLogVo);

    @PostMapping("/ims/push")
    public R sendWebSocket(@RequestBody String massage);


}
